package com.zou.study.spring.aop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @author _blank
 * @since 20210811154135
 */
@Configuration
@ComponentScans(value = { @ComponentScan(basePackages = { "com.zou.study.spring.aop" }) })
@EnableAspectJAutoProxy(proxyTargetClass = false, exposeProxy = false)
public class AopAnnotationConfigTests {

    public static void main(String[] args) {

        Class<?>[] componentClasses = { AopAnnotationConfigTests.class };

        try (final AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(componentClasses)) {

            ConfigurableEnvironment bean = ctx.getBean(ConfigurableEnvironment.class);
            System.out.println("\n" + bean.getClass().getName() + "\n");

        }
    }

}
